home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-18 | 629 b | 41 lines | [TEXT/CWIE] |
- //Copyright (c) 1997 Aidan Cully
- //All rights reserved.
-
- #include "CLPicture.h"
-
- TPicture::TPicture( Rect r )
- {
- mhParms.srcRect= r;
- mhParms.hRes = 0x00480000;
- mhParms.vRes = 0x00480000;
- mhParms.version = -2;
- mhParms.reserved1 = 0;
- mhParms.reserved2 = 0;
- mhPic= 0;
- }
-
- TPicture::~TPicture()
- {
- if( mhPic )
- ::KillPicture( mhPic );
- }
-
- Boolean TPicture::GetDrawSelf()
- {
- if( mhPic )
- ::KillPicture( mhPic );
- mhPic= ::OpenCPicture( &mhParms );
- ::ClipRect( &mhParms.srcRect );
- return( true );
- }
-
- Boolean TPicture::ReleaseDrawSelf()
- {
- ::ClosePicture();
- return( true );
- }
-
- PicHandle TPicture::GetPic()
- {
- return( mhPic );
- }